#ifndef QQTHOSTADDRESSMANAGER_H
#define QQTHOSTADDRESSMANAGER_H

#include <QObject>

#include <QHostAddress>
#include <QHostInfo>

#include <QNetworkInterface>
#include <QNetworkAddressEntry>

#include <qqtdictionary.h>

#include <qqthighgrade_global.h>
/**
 * @brief The QQtHostAddressManager class
 * 把Qt的IP地址接口获取到的数据都分解到字典里。
 */
class QQTHIGHGRADESHARED_EXPORT QQtHostAddressManager : public QObject
{
    Q_OBJECT

public:
    explicit QQtHostAddressManager ( QObject* parent = 0 );
    virtual ~QQtHostAddressManager();

    //构造函数里会调用一次。
    void refreshAddressDictionary();

    QQtDictionary& dictionary();

    QString getDomainName();
    QString getDomainAddress();

    QString getHostName();
    QString getHostAddress();

    QHostAddress getBroadcast();
protected:

private:
    QQtDictionary mDictAddress;
};

#endif // QQTHOSTADDRESSMANAGER_H

